
package Class;

public class Demo01 {
    public Demo01() {
    }

    public static void main(String[] args) {
        int a = -10;
        int b;
        if (a >= 3) {
            b = 2 * a + 1;
        } else if (-1 < a && a < 3) {
            b = 2 * a;
        } else {
            b = 2 * a - 1;
        }

        System.out.println("结果是:" + b);
    }
}

